#include<stdio.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<errno.h>
#include<unistd.h>

int main()
{
    int fa;
    fa = open("test_c2.txt",O_RDONLY);
    if(fa == -1)
    {
        printf("fa = %d\n",fa);
        printf("errno = %d\n",errno);
        perror("fail to open");
        return -1;
    }
    printf("fa = %d\n",fa);
    close(fa);
    return 0;
}